package edu.just.pet.entity;

public class Dog {
    Integer id;
    String name;
    Integer age;
    Integer sex;
    String tip;
    Integer isAdop;
    Integer adopter;
    String photo1;
    String photo2;
    String photo3;
    String photo4;
    Integer isDel;

    // 第几页
    private Integer page;

    // 每页展示多少条
    private Integer limit;

    private Integer pageIndex;


    public Integer getPageIndex() {
        if(limit != null && page != null) {
            return (page - 1)* limit;
        }
        return pageIndex;
    }

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public void setPageIndex(Integer pageIndex) {
        this.pageIndex = pageIndex;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public String getTip() {
        return tip;
    }

    public void setTip(String tip) {
        this.tip = tip;
    }

    public Integer getAdopter() {
        return adopter;
    }

    public void setAdopter(Integer adopter) {
        this.adopter = adopter;
    }

    public String getPhoto1() {
        return photo1;
    }

    public void setPhoto1(String photo1) {
        this.photo1 = photo1;
    }

    public String getPhoto2() {
        return photo2;
    }

    public void setPhoto2(String photo2) {
        this.photo2 = photo2;
    }

    public String getPhoto3() {
        return photo3;
    }

    public void setPhoto3(String photo3) {
        this.photo3 = photo3;
    }

    public String getPhoto4() {
        return photo4;
    }

    public void setPhoto4(String photo4) {
        this.photo4 = photo4;
    }

    public Integer getIsDel() {
        return isDel;
    }

    public void setIsDel(Integer isDel) {
        this.isDel = isDel;
    }

    public Integer getIsAdop() {
        return isAdop;
    }

    public void setIsAdop(Integer isAdop) {
        this.isAdop = isAdop;
    }

    @Override
    public String toString() {
        return "Cat{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", sex=" + sex +
                ", tip='" + tip + '\'' +
                ", isAdop=" + isAdop +
                ", adopter=" + adopter +
                ", photo1='" + photo1 + '\'' +
                ", photo2='" + photo2 + '\'' +
                ", photo3='" + photo3 + '\'' +
                ", photo4='" + photo4 + '\'' +
                ", is_del=" + isDel +
                '}';
    }
}
